//
//  New_discountTableViewCell.m
//  AroundTheWorld
//
//  Created by dllo on 16/5/19.
//  Copyright © 2016年 IfelseGo an. All rights reserved.
//

#import "New_discountTableViewCell.h"

@implementation New_discountTableViewCell

- (void)setMyModel:(New_discountModel *)myModel
{
    _myModel = myModel;
    self.titleLabel.text = _myModel.title;
    
    //字符串分割
    NSRegularExpression *re = [NSRegularExpression regularExpressionWithPattern:@"[a-zA-Z.<,>,/]" options:0 error:NULL];
    NSString *string = _myModel.price;
    NSString *price= [re stringByReplacingMatchesInString:string options:0 range:NSMakeRange(0, [string length]) withTemplate:@""];
    self.priceLabel.text = price;
    self.priceoffLabel.text = _myModel.priceoff;
    [self.photoImageV sd_setImageWithURL:[NSURL URLWithString:_myModel.photo] placeholderImage:nil];

//    [cell.photoImageV sd_setImageWithURL:[NSURL URLWithString:model.photo] placeholderImage:[UIImage imageNamed:@""]];
}

- (void)setMySuperModel:(DestnationCountryDiscountSuperModel *)mySuperModel
{
    _mySuperModel = mySuperModel;
    self.titleLabel.text = _mySuperModel.title;
    
    //字符串分割
    NSRegularExpression *re = [NSRegularExpression regularExpressionWithPattern:@"[a-zA-Z.<,>,/]" options:0 error:NULL];
    NSString *string = _mySuperModel.price;
    NSString *price= [re stringByReplacingMatchesInString:string options:0 range:NSMakeRange(0, [string length]) withTemplate:@""];
    self.priceLabel.text = price;
    self.priceoffLabel.text = _mySuperModel.priceoff;
    [self.photoImageV sd_setImageWithURL:[NSURL URLWithString:_mySuperModel.photo] placeholderImage:nil];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
